package com.xmy.cultivate.feign.physics_outside;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xmy.cultivate.entity.response.MathChaPlan;
import com.xmy.cultivate.entity.views.ChaPlan;
import com.xmy.cultivate.entity.views.EduTask;
import com.xmy.cultivate.respons.PlanShutNum;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@FeignClient(value = "physics-outside")
public interface IPhysicsFeignClient {

    @ApiOperation("获取课次列表")
    @RequestMapping(value = "/api/outside/eduTask/getTaskNumber", method = RequestMethod.POST)
    public List<EduTask> getTaskNumber(@RequestBody Map<String, Object> reMap);

    @ApiOperation("关联课次，拿学习数量与第几课次")
    @RequestMapping(value = "/api/outside/eduTask/getTaskList", method = RequestMethod.POST)
    public List<EduTask> getTaskList(@RequestBody Map<String, Object> reMap);

    @ApiOperation("未完成计划")
    @RequestMapping(value = "/api/outside/chaPlan/getChaPlanList", method = RequestMethod.POST)
    public List<ChaPlan> getChaPlanList(@RequestBody Map<String, Object> reMap);

    @ApiOperation("已完成计划")
    @RequestMapping(value = "/api/outside/chaPlan/getChaPlanListYes", method = RequestMethod.POST)
    public List<ChaPlan> getChaPlanListYes(@RequestBody Map<String, Object> reMap);

    @ApiOperation("保存计划")
    @RequestMapping(value = "/api/outside/chaPlan/saveChaPlan", method = RequestMethod.POST)
    public Boolean saveChaPlan(@RequestBody ChaPlan chaPlan);

    @ApiOperation("通关率-查询期间为当前周一至周日")
    @RequestMapping(value = "/api/outside/chaPlan/getClearanceRateChaPlan", method = RequestMethod.POST)
    public ChaPlan getClearanceRateChaPlan(@RequestBody PlanShutNum planShutNum);

    /**
     * 数据录入列表
     *
     * @return
     */
    @GetMapping("/api/outside/chaPlan/getChaPanAddList")
    public Page<MathChaPlan> getChaPanAddList(
            @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
            @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
            @RequestParam(value = "schoolIdStr", required = false) String schoolIdStr,
            @RequestParam(value = "yearPart", required = false) String yearPart,
            @RequestParam(value = "quarterNum", required = false) String quarterNum,
            @RequestParam(value = "teacherId", required = false) String teacherId,
            @RequestParam(value = "gradeId", required = false) String gradeId,
            @RequestParam(value = "yearClassId", required = false) String yearClassId,
            @RequestParam(value = "gradeSection", required = false) String gradeSection,
            @RequestParam(value = "classTypeId", required = false) String classTypeId,
            @RequestParam(value = "lessonNum", required = false) String lessonNum,
            @RequestParam(value = "studentName", required = false) String studentName,
            @RequestParam(value = "status", required = false) String status,
            @RequestParam(value = "subjectsId", required = false) String subjectsId,
            @RequestParam(value = "count", required = false) String count,
            @RequestParam(value = "categoryId") Integer categoryId);

    /**
     * @return
     */
    @GetMapping("/api/outside/chaPlan/getPassRadeList")
    public List<MathChaPlan> getPassRadeList(
            @RequestParam(value = "schoolIdStr", required = false) String schoolIdStr,
            @RequestParam(value = "yearPart", required = false) String yearPart,
            @RequestParam(value = "quarterNum", required = false) String quarterNum,
            @RequestParam(value = "type", required = false) String type,
            @RequestParam(value = "lessonNumStart", required = false) String lessonNumStart,
            @RequestParam(value = "lessonNum", required = false) String lessonNum,
            @RequestParam(value = "yearClassId", required = false) String yearClassId,
            @RequestParam(value = "classTypeId", required = false) String classTypeId,
            @RequestParam(value = "readingType", required = false) String readingType,
            @RequestParam(value = "readingStatusStr", required = false) String readingStatusStr,
            @RequestParam(value = "isBeforQuarter", required = false) String isBeforQuarter,
            @RequestParam(value = "passDate", required = false) String passDate,
            @RequestParam(value = "passDateStart", required = false) String passDateStart,
            @RequestParam(value = "passDateEnd", required = false) String passDateEnd,
            @RequestParam(value = "subjectsId", required = false, defaultValue = "2") String subjectsId,
            @RequestParam(value = "rightNumStartDate", required = false) String rightNumStartDate,
            @RequestParam(value = "rightNumEndDate", required = false) String rightNumEndDate,
            @RequestParam(value = "trackId", required = false) String trackId,
            @RequestParam(value = "isYearClass", required = false, defaultValue = "0") Integer isYearClass,
            @RequestParam(value = "radeType", required = false) String radeType,
            @RequestParam(value = "listState", required = false) String listState,
            @RequestParam(value = "teacherId", required = false) String teacherId,
            @RequestParam(value = "classify", required = false) String classify,
            @RequestParam(value = "trackType", required = false) String trackType,
            @RequestParam(value = "teamId", required = false) String teamId,
            @RequestParam(value = "include", required = false) String include,
            @RequestParam(value = "inType", required = false) String inType,
            @RequestParam(value = "categoryId") Integer categoryId,
            @RequestParam(value = "isAchieve") String isAchieve,
            @RequestParam(value = "name") String name,
            @RequestParam(value = "moldType") String moldType,
            @RequestParam(value = "courseSchedulingDetailName") String courseSchedulingDetailName,
            @RequestParam(value = "examSchedulingtType") String examSchedulingtType,
            @RequestParam(value = "leadSchoolIds",required = false) String leadSchoolIds,
            @RequestParam(value = "leadSubjectsIds",required = false) String leadSubjectsIds,
            @RequestParam(value = "leadYearClassIds",required = false) String leadYearClassIds,
            @RequestParam(value = "leadTeacherId",required = false) Long leadTeacherId,
            @RequestParam(value = "isIncludeFirstCourse",required = false) Integer isIncludeFirstCourse
    );


    @GetMapping("api/outside/chaPlan/getPassRadeDetail")
    public Page<MathChaPlan> getPassRadeDetail(
            @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
            @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
            @RequestParam(value = "schoolIdStr", required = false) String schoolIdStr,
            @RequestParam(value = "yearPart", required = false) String yearPart,
            @RequestParam(value = "quarterNum", required = false) String quarterNum,
            @RequestParam(value = "teacherId", required = false) String teacherId,
            @RequestParam(value = "type", required = false) String type,
            @RequestParam(value = "gradeId", required = false) String gradeId,
            @RequestParam(value = "lessonNumStart", required = false) String lessonNumStart,
            @RequestParam(value = "lessonNum", required = false) String lessonNum,
            @RequestParam(value = "yearClassId", required = false) String yearClassId,
            @RequestParam(value = "classTypeId", required = false) String classTypeId,
            @RequestParam(value = "readingType", required = false) String readingType,
            @RequestParam(value = "readingStatusStr", required = false) String readingStatusStr,
            @RequestParam(value = "isBeforQuarter", required = false) String isBeforQuarter,
            @RequestParam(value = "passType", required = false) String passType,
            @RequestParam(value = "passDate", required = false) String passDate,
            @RequestParam(value = "passDateStart", required = false) String passDateStart,
            @RequestParam(value = "passDateEnd", required = false) String passDateEnd,
            @RequestParam(value = "courseVersionId", required = false) String courseVersionId,
            @RequestParam(value = "subjectsId", required = false) String subjectsId,
            @RequestParam(value = "rightNumStartDate", required = false) String rightNumStartDate,
            @RequestParam(value = "rightNumEndDate", required = false) String rightNumEndDate,
            @RequestParam(value = "studentName", required = false) String studentName,
            @RequestParam(value = "radeType", required = false) String radeType,
            @RequestParam(value = "classify", required = false) String classify,
            @RequestParam(value = "trackType", required = false) String trackType,
            @RequestParam(value = "teamId", required = false) String teamId,
            @RequestParam(value = "include", required = false) String include,
            @RequestParam(value = "listState", required = false) String listState,
            @RequestParam(value = "inType", required = false) String inType,
            @RequestParam(value = "categoryId") Integer categoryId,
            @RequestParam(value = "courseSchedulingDetailName") String courseSchedulingDetailName,
            @RequestParam(value = "studentIdStr", required = false) String studentIdStr,
            @RequestParam(value = "moldType", required = false) String moldType,
            @RequestParam(value = "examSchedulingtType", required = false) String examSchedulingtType,
            @RequestParam(value = "leadSchoolIds",required = false) String leadSchoolIds,
            @RequestParam(value = "leadSubjectsIds",required = false) String leadSubjectsIds,
            @RequestParam(value = "leadYearClassIds",required = false) String leadYearClassIds,
            @RequestParam(value = "leadTeacherId",required = false) Long leadTeacherId,
            @RequestParam(value = "isIncludeFirstCourse",required = false) Integer isIncludeFirstCourse
    );

    @GetMapping("/api/outside/chaPlan/getPassRadeDetailTotal")
    public MathChaPlan getPassRadeDetailTotal(
            @RequestParam(value = "schoolIdStr", required = false) String schoolIdStr,
            @RequestParam(value = "yearPart", required = false) String yearPart,
            @RequestParam(value = "quarterNum", required = false) String quarterNum,
            @RequestParam(value = "teacherId", required = false) String teacherId,
            @RequestParam(value = "type", required = false) String type,
            @RequestParam(value = "gradeId", required = false) String gradeId,
            @RequestParam(value = "lessonNumStart", required = false) String lessonNumStart,
            @RequestParam(value = "lessonNum", required = false) String lessonNum,
            @RequestParam(value = "yearClassId", required = false) String yearClassId,
            @RequestParam(value = "classTypeId", required = false) String classTypeId,
            @RequestParam(value = "readingType", required = false) String readingType,
            @RequestParam(value = "readingStatusStr", required = false) String readingStatusStr,
            @RequestParam(value = "isBeforQuarter", required = false) String isBeforQuarter,
            @RequestParam(value = "passType", required = false) String passType,
            @RequestParam(value = "passDate", required = false) String passDate,
            @RequestParam(value = "passDateStart", required = false) String passDateStart,
            @RequestParam(value = "passDateEnd", required = false) String passDateEnd,
            @RequestParam(value = "courseVersionId", required = false) String courseVersionId,
            @RequestParam(value = "subjectsId", required = false) String subjectsId,
            @RequestParam(value = "rightNumStartDate", required = false) String rightNumStartDate,
            @RequestParam(value = "rightNumEndDate", required = false) String rightNumEndDate,
            @RequestParam(value = "studentName", required = false) String studentName,
            @RequestParam(value = "radeType", required = false) String radeType,
            @RequestParam(value = "classify", required = false) String classify,
            @RequestParam(value = "trackType", required = false) String trackType,
            @RequestParam(value = "teamId", required = false) String teamId,
            @RequestParam(value = "include", required = false) String include,
            @RequestParam(value = "inType", required = false) String inType,
            @RequestParam(value = "categoryId") Integer categoryId);


    @PostMapping("/api/outside/chaPlan/addChaPlan")
    public boolean addChaPlan(@RequestBody MathChaPlan chaPlan);


    @GetMapping("/api/outside/eduTask/getTaskForNowList")
    public Map<String, Object> getTaskForNowList(@RequestParam("yearPart") String yearPart,
                                                 @RequestParam("quarterNum") String quarterNum,
                                                 @RequestParam(value = "subjectsId", required = false) String subjectsId,
                                                 @RequestParam(value = "categoryId") Integer categoryId);


    @PostMapping("/api/outside/chaPlan/getChaPlanLessonNumString")
    public String getChaPlanLessonNumString(@RequestBody MathChaPlan mathChaPlan);


    /**
     * 荣誉榜单列表
     */
    @GetMapping("/api/outside/chaPlan/getHonorList")
    public List<MathChaPlan> getHonorList(@RequestParam(value = "yearPart", required = false) String yearPart,
                                          @RequestParam(value = "quarterNum", required = false) String quarterNum,
                                          @RequestParam(value = "schoolIdStr", required = false) String schoolIdStr,
                                          @RequestParam(value = "yearClassIdStr", required = false) String yearClassIdStr,
                                          @RequestParam(value = "type", required = false) String type,
                                          @RequestParam(value = "lessonNumStart", required = false) String lessonNumStart,
                                          @RequestParam(value = "lessonNumEnd", required = false) String lessonNumEnd,
                                          @RequestParam(value = "classTypeId", required = false) String classTypeId,
                                          @RequestParam(value = "readingType", required = false) String readingType,
                                          @RequestParam(value = "subjectsId", required = false) String subjectsId,
                                          @RequestParam(value = "isBeforQuarter", required = false) String isBeforQuarter,
                                          @RequestParam(value = "trackId", required = false) String trackId,
                                          @RequestParam(value = "teacherId", required = false) String teacherId,
                                          @RequestParam(value = "name", required = false) String name,
                                          @RequestParam(value = "include", required = false) String include,
                                          @RequestParam(value = "taskCategoryId", required = false) Integer taskCategoryId,
                                          @RequestParam(value = "classify", required = false) String classify,
                                          @RequestParam(value = "trackType", required = false) String trackType,
                                          @RequestParam(value = "teamId", required = false) String teamId,
                                          @RequestParam(value = "startDate", required = false) String startDate,
                                          @RequestParam(value = "endDate", required = false) String endDate
    );

    /**
     * 荣誉榜单详情
     */
    @GetMapping("/api/outside/chaPlan/getHonorDetails")
    public Page<MathChaPlan> getHonorDetails(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                                             @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
                                             @RequestParam(value = "yearPart", required = false) String yearPart,
                                             @RequestParam(value = "quarterNum", required = false) String quarterNum,
                                             @RequestParam(value = "schoolIdStr", required = false) String schoolIdStr,
                                             @RequestParam(value = "yearClassIdStr", required = false) String yearClassIdStr,
                                             @RequestParam(value = "type", required = false) String type,
                                             @RequestParam(value = "lessonNumStart", required = false) String lessonNumStart,
                                             @RequestParam(value = "lessonNumEnd", required = false) String lessonNumEnd,
                                             @RequestParam(value = "classTypeId", required = false) String classTypeId,
                                             @RequestParam(value = "readingType", required = false) String readingType,
                                             @RequestParam(value = "subjectsId", required = false) String subjectsId,
                                             @RequestParam(value = "isBeforQuarter", required = false) String isBeforQuarter,
                                             @RequestParam(value = "trackId", required = false) String trackId,
                                             @RequestParam(value = "teacherId", required = false) String teacherId,
                                             @RequestParam(value = "name", required = false) String name,
                                             @RequestParam(value = "include", required = false) String include,
                                             @RequestParam(value = "taskCategoryId", required = false) Integer taskCategoryId,
                                             @RequestParam(value = "passType", required = false) String passType,
                                             @RequestParam(value = "classify", required = false) String classify,
                                             @RequestParam(value = "trackType", required = false) String trackType,
                                             @RequestParam(value = "teamId", required = false) String teamId,
                                             @RequestParam(value = "gradeId", required = false) String gradeId,
                                             @RequestParam(value = "startDate", required = false) String startDate,
                                             @RequestParam(value = "endDate", required = false) String endDate
    );

    @GetMapping("/api/outside/eduTask/getTaskNowMaxLessonNum")
    public Integer getTaskNowMaxLessonNum(@RequestParam(value = "yearPart",required = false,defaultValue = "0") String yearPart,
                                    @RequestParam(value = "quarterNum",required = false,defaultValue = "0") String quarterNum,
                                    @RequestParam(value = "subjectsId",required = false,defaultValue = "0") String subjectsId,
                                    @RequestParam(value = "courseVersionId",required = false,defaultValue = "1676874588501311488") Long courseVersionId,
                                    @RequestParam(value = "categoryId",required = false,defaultValue = "1") Integer categoryId);

    @GetMapping("/api/outside/chaPlan/updatePassLesson")
    public Integer updatePassLesson(@RequestParam("yearPart") Integer yearPart,
                                    @RequestParam("quarterNum") Integer quarterNum
    );
}
